<template>
    <div>子页面</div>
	<div v-for="(item, index) in getData" :key="index">{{item.title}}</div>
</template>

<script>
import { useStore } from 'vuex'
export default {
    props: {
        title: {
            type: String,
            default: ''
        }
    },
	computed: {
	  getData() {
		  const store = useStore()
		  return store.state.category.category
	  }
	},
    setup(props, { expose }) {
        const init = () => {
            console.log('调用子组件方法')
        }

        // expose({
        //     init
        // })

        return {
            init
        }
    }
}
</script>
